1. Field of the Invention
Methods and apparatuses consistent with the present invention relate to encoding/decoding an image based on a region of interest (ROI), which provide error-resilience by duplicating ROI data in a variable manner according to image features or by reducing non-ROI data when the image is encoded or decoded.
2. Description of the Related Art
In general, image compression is carried out by eliminating data redundancy. To eliminate data redundancy, temporal prediction encoding is performed using motion estimation and motion compensation, spatial prediction encoding is performed by eliminating similar colors or object redundancy within a frames and then transform/quantization and entropy encoding are performed.
When an image is compressed through the aforementioned processes and is transmitted via a transfer medium, errors such as packet loss may occur. An image including an error packet cannot be normally decoded. In particular, when the error packet contains a region of interest (ROI) image, image quality may deteriorate. To solve this problem, an ROI based image encoding method in which an ROI that is relatively more important than other regions is duplicated in a pre-processing operation performed prior to image encoding has been proposed. In this method, even if a portion of information regarding the ROI is lost, the image can be restored using information regarding duplicated other ROI, thereby improving error resilience when errors occur in the ROI.
FIGS. 1A and 1B illustrate an example of a related art ROI based image encoding method. FIG. 2 is a view for explaining a related art ROI based image encoding method.
“Error-Resilient Region-of-Interest Video Coding” (IEEE Transactions On The Circuits and Systems for Video Technology, September 2005, Ali Jerbi, Jian Wang and Shahram Shirani) proposes an image encoding method in which duplicate blocks are created by enlarging an ROI, for example, a face of a person 10 as shown in FIG. 1A, to as much as twice the original size on a block basis, and a non-ROI is downsized by a desired amount according to a relative position with respect to the ROI to configure a transformed image as shown in FIG. 1B, thereby encoding the transformed image.
Referring to FIG. 2, in the conventional ROI based image encoding method, blocks A through F located in an ROI 20 are each duplicated into two blocks. For example, the block A is duplicated into blocks A1 and A2, the block B is duplicated into blocks B1 and B2. Similarly, in this manner, the block F is duplicated into blocks F1 and F2. Meanwhile, blocks a to 1 in a non-ROI are downsized due to the duplication of the ROI blocks. When an image that is reconfigured by duplicating the blocks in the ROI, even if a portion of the ROI of the reconfigured image is lost due to a channel error, information regarding the duplicated other blocks can be used, thereby improving the probability of restoring the image in the ROI.
However, in the related art ROI based image encoding method, all blocks in the ROI are concurrently duplicated at equal magnification without considering the features of an image in the ROI. In other words, whether the blocks are simple or complex, all of the blocks in the ROI are duplicated at the same magnification. For this reason, according to the prior art, a bit assignment cannot be properly carried out for a complex image region which requires relatively more bits within a limited bandwidth. Therefore, ROI blocks corresponding to a simple image consume more bits than necessary, and insufficient data can be used to encode ROI blocks corresponding to a complex image, which makes it difficult to restore an image when errors occur.